<script setup lang="ts">
import Category from "@/components/home/Category.vue";
import Carousel from "@/components/home/Carousel.vue";
import GoodsResult from "@/components/goodsList/GoodsResult.vue";
import GoodsQuery from '@/components/goodsList/GoodsQuery.vue';

import {ref} from "vue";
import type{Goods} from "@/common/types/result";
import {getGoods} from "@/common/constants/Common";
let ListItem = ref<Goods[]>(getGoods.list)
const searchParams = ref({
  keyword: null,
  minPrice: null,
  maxPrice:null,
  categoryId: null
});
const handleSearch = (params:any) => {
  searchParams.value = params;
};
</script>

<template>
<Carousel/>
<div class="main">
  <!-- <Ranking/> -->
  <goods-query @search="handleSearch" style="opacity: 0.7"></goods-query>
  <goods-result :searchParams="searchParams">
    <template #buttonView>
      <el-button size="small" style="width: 100%" type="success" class="button">查看详情</el-button>
    </template>
  </goods-result>
</div>
</template>
<style lang="scss" scoped>
.main{
  width: 1200px;
  margin: 10px auto;
}
</style>
